<?php


namespace app\admin\model;


class SpecKey extends BaseModel
{
    public function specValue()
    {
        return $this->hasMany('SpecValue', 'spec_key_id', 'id');
    }
    public static function getRawAll()
    {
        return self::select();
    }

    public static function getRawOne($id)
    {
        return self::where('id', '=', $id)->find();
    }

    public static function getAll()
    {
        return self::with('specValue')->select();
    }
    public static function getOne($id)
    {
        return self::with('specValue')->where('id', '=', $id)->find();
    }
}